package com.example.gb28181.strategy.impl;

import com.example.gb28181.enums.MessageEnum;
import com.example.gb28181.strategy.MessageStrategy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * @Description 心跳处理策略
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022/7/21
 */
@Component
@Slf4j
public class MessageKeepAliveStrategy implements MessageStrategy {
    @Override
    public boolean support(MessageEnum messageEnum) {
        if (Objects.isNull(messageEnum)) {
            return false;
        }
        return MessageEnum.MESSAGE_KEEP_ALIVE.equals(messageEnum);
    }

    @Override
    public void processor() {
        log.info("====================>心跳处理");
    }
}
